﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Model.Category>" %>
<%@ Import Namespace="UI.Helper" %>

<%= Utils.IncludeJS(this.Html, "~/Scripts/jquery.validate.min.js")%>

<!-- start id-form -->
<table border="0" cellpadding="0" cellspacing="0" id="id-form">
    <tr>
        <th valign="top">
            Tên danh mục:
        </th>
        <td>
            <%: Html.TextBoxFor(c => c.Name, new {@class="inp-form", id = "Name"}) %>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <th>
            &nbsp;
        </th>
        <td valign="top">
            <input type="submit" value="" class="form-submit" />
            <%--<input type="reset" value="" class="form-reset" />--%>
        </td>
        <td>
        </td>
    </tr>
</table>
<!-- end id-form  -->

<script type="text/javascript">
    $(document).ready(function () {
        $("#infoForm").validate({
            rules:
            {
                Name: { required: true }
            },
            messages:
            {
                Name: { required: 'Hãy nhập tên danh mục.' }
            },
            errorElement: "div"
        })
    });
</script>
